
//
// 101101 - AH - Created.
// 101128 - AH - Moved from package org.soekrat.engine.mine
//

package org.soekrat.engine.io;

import java.io.IOException;

/**
 * <p>
 *   Interface for objects that creates resource objects given the resource's
 *   specification.
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC) 
 */
public interface ResourceFactory 
{
  /**
   * <p>
   *   Creates resource given it's specification.
   * </p>
   * @param spec Specification.
   * @return Created.
   * @throws IllegalArgumentException If {@code spec} invalid.
   * @throws IOException If fails to read external data.
   */
  Object create(String spec) throws IOException;
  
}
